using System;
using System.Collections.Generic;
using System.Web.UI;


namespace shfa.snomtastic.admin.components
{
    public abstract class EditBase : UserControl
    {
        public delegate void ActionEventHandler(object sender, ActionClickArgs e);
        public delegate void NavEventHandler(object sender, NavEventArgs e);

        public event NavEventHandler NavEvent;
        public event ActionEventHandler ActionEvent;

        public Guid ItemId { get; set; }
        public Guid ParentId { get; set; }

        protected void RaiseNavEvent(object sender, NavEventArgs e)
        {
            if (NavEvent != null)
                NavEvent(sender, e);
        }

        protected void RaiseActionEvent(object sender, ActionClickArgs e)
        {
            if (ActionEvent != null)
                ActionEvent(sender, e);
        }


        void EditBase_Init(object sender, EventArgs e)
        {
            
            this.ActionEvent += new ActionEventHandler(EditBase_ActionEvent);
        }


        public abstract void EditBase_ActionEvent(object sender, ActionClickArgs e);

        public abstract List<ActionInfo> ActionList { get; }

       
    }
}
